package com.unit.handler;

import java.time.LocalDate;

import com.unit.util.TimeUtil;

public class LocalDateHandler implements DataObjectHandler {

	@Override
	public Object convert(String data, Class<?> propType) {
		if(LocalDate.class.equals(propType)) {
			try {
				return TimeUtil.convertLocalDate(data);
			} catch (Exception e) {
				throw new RuntimeException(e.getMessage());
			}
		}
		return null;
	}

}
